-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort model properties #622
Conversation
Closing due to my time constraints. There is a bit more work, as a few tests are failing, but this is the general idea on how to sort properties. |
@locks Any reason for the re-open? It'd be awesome if you could tackle this ;) |
@ryanlitalien just tried it locally and it doesn't seem to be failing tests anymore. You should try re-running the CI build. (I think closing/re-opening the PR triggers that?) |
@teddyzeenny Can you please merge and release? Thanks! |
app/components/mixin-detail.js
Outdated
@@ -17,6 +17,9 @@ export default Component.extend({ | |||
return this.get('model.expand') && this.get('model.properties.length') > 0; | |||
}), | |||
|
|||
sortProperties: ['name'], | |||
sortedProperties: sort('model.properties', 'sortProperties'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please document these? We're trying to document new code to slowly transition to a documented codebase.
/**
* Used by the `sort` computed macro.
*
* @property sortProperties
* @type {Array<String>}
*/
sortProperties: ['name'],
/**
* Sort the properties by name to make them easier to find in the object inspector.
*
* @property sortedProperties
* @type {Array<Object>}
*/
sortedProperties: sort('model.properties', 'sortProperties'),
Thanks! |
Sort the properties of the selected mixin on the object-inspector sidebar.
Mentioned in this issue: #562
(I had some issues with tests, though running it against my Ember app, the properties were sorted correctly)